import React, { useEffect, useState, lazy, Suspense } from "react";

import First from "./pages/topone";
import Login from "./pages/login";
import Mygwc from "./pages/mygwc";
import No from "./pages/nofond";
import Zhuce from "./pages/zhuce";
import Myhome from "./pages/myhome";
import Xq from "./pages/xiangqing";
import { Route, Routes } from "react-router-dom";
import Dianpu from "./pages/mydianpu";
import Add_products from "./pages/add_products";
import Cs from "./pages/cs";
import Zc from "./pages/zc";

// import Appp from "./apple";

// const list = [
//   { id: 1, xiangqing: 'apple', age: 18 },
//   { id: 2, xiangqing: 'apple1', age: 18 },
//   { id: 3, xiangqing: 'apple2', age: 18 },
//   { id: 4, xiangqing: 'apple3', age: 18 },
//   { id: 5, xiangqing: 'apple4', age: 18 },
//   { id: 6, xiangqing: 'apple5', age: 18 },
//   { id: 7, xiangqing: 'apple6', age: 18 },
//   { id: 8, xiangqing: 'apple7', age: 18 },
//   { id: 9, xiangqing: 'apple8', age: 18 },
//   { id: 10, xiangqing: 'apple9', age: 18 },
//   { id: 11, xiangqing: 'apple10', age: 18 },
//   { id: 82, xiangqing: 'apple7', age: 18 },
//   { id: 93, xiangqing: 'apple8', age: 18 },
//   { id: 104, xiangqing: 'apple9', age: 18 },
//   { id: 115, xiangqing: 'apple10', age: 18 },
//   { id: 913, xiangqing: 'apple8', age: 18 },
//   { id: 1014, xiangqing: 'apple9', age: 18 },
//   { id: 1115, xiangqing: 'apple10', age: 18 }
  
// ]

// const Myhome = lazy(() => import("./pages/myhome"));
export default function App() {

  

  return (
    <div className="beijing">

      <Routes>
       
          <Route path="/" element={<First />} >
            <Route index element={<Myhome />} />
            <Route path="/mygwc" element={<Mygwc />} />
            <Route path="*" element={<No />} />
            <Route path="/zhuce" element={<Zhuce />} />
            <Route path="/login" element={<Login />} />
            <Route path="/dianpu" element={<Dianpu />} />
            <Route path=":objectId" element={<Xq/>} />
            <Route path="/add_products" element={<Add_products/>}/>
            <Route path="/cs" element={<Cs/>}/>
            <Route path="/zc" element={<Zc/>}/>
          </Route>
        


      </Routes>
{/* </Suspense> */}
    </div>
  )


}